/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.proyectofinal.ramas.domain;

import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

/**
 *
 * @author nicolas
 */
@Embeddable
    public  class UserRolePK implements Serializable {
        @JoinColumn(name = "userID")
        @OneToOne
        protected User user;  
        
        @JoinColumn(name = "roleID")
        @OneToOne
        protected Role role;
        
        @JoinColumn(name = "companyID")
        @OneToOne
        protected Company company;


        public UserRolePK() {}

        public UserRolePK(User user, Role role, Company company) {
            this.user = user;
            this.role = role;
            this.company = company;
                                                                              }
        
        public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }
       }
